<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center feedBackDetail_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub feedBackDetail_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  feedBackDetail_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">&#xE794;</text>
				</view>
				<view class='flex flex-wrap align-stretch justify-center flex-sub'>
					<text class='feedBackDetail_fd0_0_c1_c0'>反馈记录</text>
				</view>
				<view class='flex flex-wrap align-center feedBackDetail_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#cd962d"></u-loading>
			<view class="loading_text">加载中</view>
		</view>

		<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout feedBackDetail_flex_1" v-else>
			<template v-for='(item, index) in list'>
				<view class='flex flex-wrap align-start feedBackDetail_fd1_0' :key='index'>
					<image class='feedBackDetail_fd1_0_c0' mode="aspectFill" :src='item.user_avatar'></image>
					<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
						<view class='flex flex-direction flex-wrap align-stretch feedBackDetail_fd1_0_c1_c0'>
							<view class='flex-sub feedBackDetail_fd1_0_c1_c0_c0'>
								<text class='feedBackDetail_fd1_0_c1_c0_c0_c0'>{{item.body}}</text>
							</view>
						</view>
						<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c1'>
							<template v-for='(child,key1) in item.thumb'>
								<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c1_c0' :key='key1'>
									<image class='feedBackDetail_fd1_0_c1_c1_c0_c0' mode="aspectFill" :src='child'
										@tap.stop="previewImage1(key1, item.thumb)">
									</image>
								</view>
							</template>

						</view>
						<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c2' v-if="item.contact">
							<text class='feedBackDetail_fd1_0_c1_c2_c0'>联系人：</text>
							<text class='feedBackDetail_fd1_0_c1_c2_c0'>{{item.contact}}</text>
						</view>
						<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c3'>
							<text class='feedBackDetail_fd1_0_c1_c3_c0'>反馈类型：</text>
							<text class='feedBackDetail_fd1_0_c1_c3_c0'>{{item.type_name}}</text>
						</view>
						<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c3'>
							<text class='feedBackDetail_fd1_0_c1_c3_c0'>反馈时间：</text>
							<text class='feedBackDetail_fd1_0_c1_c3_c0'>{{item.create_time}}</text>
						</view>
						<view class='flex flex-wrap align-center feedBackDetail_fd1_0_c1_c5' v-if="item.is_replay=='2'">
							<text class='feedBackDetail_fd1_0_c1_c5_c0'>平台回复：</text>
							<text class='feedBackDetail_fd1_0_c1_c5_c1'>{{item.replay}}</text>
						</view>
					</view>
				</view>
			</template>
			<u-loadmore v-if="last_page > 1" class="loadmore" font-size="24" :status="status" :icon-type="iconType"
				:load-text="loadText" />
		</view>
		<view class="noData" v-if="list.length == 0 && !isShow">
			<image src="/static/empty/no.png"></image>
			<view>没有记录~</view>
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},

		data() {
			return {
				"list": [],
				"page": 1,
				"is_pull": true,
				"last_page": 1,
				"status": 'loadmore',
				"iconType": 'flower',
				"loadText": {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '我也是有底线的'
				},
				"isShow": true,
				"dataList": []
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.page = 1;
			this.is_pull = true;
			this.isShow = true;
			this.getList();
		},
		onHide() {

		},
		onResize() {

		},
		// 下拉刷新
		onPullDownRefresh() {
			this.page = 1;
			this.is_pull = true;
			this.isShow = true;
			this.getList();
		},
		// 上拉加载
		onReachBottom() {
			if (this.page >= this.last_page) return;
			this.status = 'loading';
			this.page++;
			setTimeout(() => {

				if (this.page >= this.last_page) this.status = 'nomore';
				else this.status = 'loading';
				this.is_pull = false;
				this.getList();
			}, 500)
		},
		onPageScroll(e) {

		},
		methods: {
			getList() {
				this.$api.post(global.apiUrls.post636dc7436d54d, {
					page: this.page
				}).then(res => {
					uni.stopPullDownRefresh();
					this.isShow = false;
					if (res.data.code == 1) {
						this.last_page = res.data.data.last_page;
						if (this.is_pull) {
							this.list = res.data.data.data;
						} else {
							this.list = this.list.concat(res.data.data.data);
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			previewImage1(index, urls) {
				uni.previewImage({
					current: index,
					urls: urls
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: var(--benbenbgColor1);
		background-size: 100% auto !important;
	}

	.feedBackDetail_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.feedBackDetail_fd0_0_c2 {
		width: 32rpx;
		height: 32rpx;
	}

	.feedBackDetail_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.feedBackDetail_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.feedBackDetail_fd0_0 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.feedBackDetail_flex_1 {
		padding: 0rpx 24rpx 0rpx 24rpx;
	}

	.feedBackDetail_fd1_0_c1_c5_c1 {
		line-height: 46rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
	}

	.feedBackDetail_fd1_0_c1_c5_c0 {
		line-height: 46rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(73, 106, 157, 1);
	}

	.feedBackDetail_fd1_0_c1_c5 {
		background: rgba(248, 248, 248, 1);
		padding: 24rpx 16rpx 24rpx 16rpx;
		margin: 16rpx 0rpx 0rpx 0rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		background-size: 100% auto !important;
	}

	.feedBackDetail_fd1_0_c1_c3_c0 {
		line-height: 46rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
	}

	.feedBackDetail_fd1_0_c1_c3 {
		margin: 0rpx 0rpx 16rpx 0rpx;
		padding: 0rpx 0rpx 0rpx 16rpx;
	}

	.feedBackDetail_fd1_0_c1_c2_c0 {
		line-height: 46rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #333;
	}

	.feedBackDetail_fd1_0_c1_c2 {
		margin: 20rpx 0rpx 16rpx 0rpx;
		padding: 0rpx 0rpx 0rpx 16rpx;
	}

	.feedBackDetail_fd1_0_c1_c1_c0_c0 {
		width: 180rpx;
		height: 180rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.feedBackDetail_fd1_0_c1_c1_c0 {
		margin: 12rpx 15rpx 12rpx 15rpx;
	}

	.feedBackDetail_fd1_0_c1_c1 {
		padding: 12rpx 0rpx 0rpx 0rpx;
	}

	.feedBackDetail_fd1_0_c1_c0_c0_c1 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		right: 0rpx;
		bottom: 0rpx;
	}

	.feedBackDetail_fd1_0_c1_c0_c0_c0 {
		line-height: 46rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		padding: 0rpx 32rpx 0rpx 0rpx;
		// -webkit-line-clamp: 2;
		// overflow: hidden;
		// text-overflow: ellipsis;
		// display: -webkit-box;
		// -webkit-box-orient: vertical;
	}

	.feedBackDetail_fd1_0_c1_c0_c0 {
		position: relative;
	}

	.feedBackDetail_fd1_0_c1_c0 {
		position: relative;
		padding: 0rpx 0rpx 0rpx 16rpx;
	}

	.feedBackDetail_fd1_0_c0 {
		width: 72rpx;
		height: 72rpx;
		border-radius: 50rpx 50rpx 50rpx 50rpx;
	}

	.feedBackDetail_fd1_0 {
		border-bottom: 1px solid #eee;
		padding: 24rpx 0rpx 32rpx 0rpx;
	}
</style>